package UI;

import java.awt.Color;

import javax.swing.JTabbedPane;

import controller.IEditorsController;
import UI.editors.EditorGraphMode;
import UI.editors.EditorSemanticMode;
import UI.editors.EditorSyntaxMode;
import UI.editors.EditorTextMode;

/**
 * @date Apr. 18 2012
 * @author Francisco J. Martínez
 * This views contains all edit modes in tabs organized
 */
public class EditorsUI extends JTabbedPane {

	private static final long serialVersionUID = 201204122057L;
	
	private EditorTextMode mTextMode;
	private EditorGraphMode mGraphMode;
	private EditorSemanticMode mSemanticMode;
	private EditorSyntaxMode mSyntaxMode;
	
	private IEditorsController mController;


	public EditorsUI() {

		this.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(Color.TRANSLUCENT)));
//		this.setBorder(javax.swing.BorderFactory
//				.createLineBorder(new java.awt.Color(0, 0, 0)));
		
		mTextMode = new EditorTextMode();
		mGraphMode = new EditorGraphMode();
		mSemanticMode = new EditorSemanticMode();
		mSyntaxMode = new EditorSyntaxMode();
		
	
		this.addTab("Modo texto", mTextMode);
		this.addTab("Modo gráfico", mGraphMode);
		this.addTab("Schema", mSemanticMode);
		this.addTab("Semántica", mSyntaxMode);

	}
	
	public IEditorsController getController() {
		return mController;
	}
	
	public void setController(IEditorsController mController) {
		this.mController = mController;
	}
	
	public EditorTextMode getTextMode() {
		return mTextMode;
	}

	public EditorGraphMode getGraphMode() {
		return mGraphMode;
	}

	public EditorSemanticMode getSemanticMode() {
		return mSemanticMode;
	}

	public EditorSyntaxMode getSyntaxMode() {
		return mSyntaxMode;
	}

}
